package cn.smile.bean.entity.msg;

import cn.smile.commons.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * 邮件发送记录
 *
 * @author smile-jt
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("email_info")
public class EmailInfo extends BaseDomain {
    @Serial
    private static final long serialVersionUID = 7210789921415484548L;

    /**
     * 接收地址
     */
    private String receiveAdd;

    /**
     * 邮件标题
     */
    private String emailTitle;

    /**
     * 邮件内容
     */
    private String emailContent;

    /**
     * 发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime sendTime;

    /**
     * 发送用户
     */
    private String sendUserId;

    /**
     * 模版code
     */
    private String templateCode;

    /**
     * 邮件发送异常
     */
    private Boolean sendError;

    /**
     * 错误内容
     */
    private String errorMsg;
}